home *** CD-ROM | disk | FTP | other *** search
/ Acorn User: China / Acorn User China CD-ROM (UK) (Disc B) / Acorn User China CD-ROM (UK) (Disc B).bin / STUTTGART / FROMUTS / SCICALC / !SciCalc_!Help < prev    next >
Encoding:
Text File  |  1992-12-31  |  18.1 KB  |  521 lines

  1. A Scientific Calculator
  2. =======================
  3.  
  4. Version 1.07 (1-Jan-93)
  5.  
  6.  
  7. * If you do not read documentation then please note the *
  8. * following ‘key’ (sic) features of this calculator.    *
  9. *                                                       *
  10. *  Result dragging                                      *
  11. *  <ALT> rather than <SHIFT> now does simulated input   *
  12. *  Key short cuts ( + translation table)                *
  13. *  Fully algebraic                                      *
  14. *  Constant operations                                  *
  15. *  Adjust accesses the inverse function                 *
  16. *  Auto detects BASIC 64 and uses the extra precision   *
  17. *  Now with desktop saving!                             *
  18. *  Can rename the app with no problem cos uses chkspr   *
  19.  
  20. * This app is now well past its FOURTH birthday -       *
  21. * would users please read the questions near the of     *
  22. * this document and - perhaps - reply.                  *
  23.  
  24.  
  25. Files included in this package :-
  26.   
  27.   !Run
  28.   !Run64
  29.   !RunImage
  30.   !Sprites
  31.   !Help
  32.   Templates
  33.   Sprites
  34.   messages
  35.   KeyTable
  36.   MakeTable
  37.   chkspr    ) my chkspr util, rename the app and see what
  38.   !Boot     ) happens (nothing!), description in Comments.
  39.  
  40. When this scientific calculator application was first
  41. written there were no others. Now there are several,
  42. including the dreadful Acorn one. I hope you find that this
  43. is the best - if not I would appreciate a note!
  44.  
  45. Introduction
  46. ------------
  47.  
  48.   The calculator is fully algebraic.
  49.  
  50.   [ This means expressions are evaluated using
  51.     BODMAS order (Brackets, Power, Divide/Multiply,
  52.     Add/Subtract - where brackets are evaluated
  53.     first). Hence 2+3*4 is calculated as 2+(3*4)
  54.     since * has a higher priority - non-algebraic
  55.     calculators that would evaluate (2+3)*4         ]
  56.  
  57.  
  58.   Also the calculator handles magnitudes greater than
  59. 99999999, using 9 digits with scientific notation (9 digits
  60. because the tenth digit in BBC BASIC V is generally wrong
  61. when doing function calculations)
  62.  
  63. Should this calculator be loaded under BASIC VI the 64 bit
  64. floating point BASIC 64 then the extra precision will
  65. manifest itself.
  66.  
  67. NOTE BASIC V’s  largest number is of the order 1*10^32
  68.                 precision is about 9 digits
  69.  
  70.      BASIC VI’s largest number is of the order 1*10^308
  71.                 precision is about 14 digits
  72.  
  73. To load !SciCalc under BASIC VI (64bit) you simply need to
  74. rename (or delete) the current !Run file and then rename
  75. !Run64 to !Run.
  76.  
  77.   On top of all this the calculator has a very large range
  78. of scientific functions. The range and layout have been
  79. inspired by years of Casio calculator use - I’m sorry but
  80. TIs are shite!
  81.  
  82. Usage
  83. -----
  84.  
  85.   Functions are accessed by using the standard
  86. ‘Reverse-Polish’ method used on normal calculators
  87. (eg 20 sin rather than sin 20).
  88.  
  89.   All functions are listed in the Appendix below.
  90.  
  91.   To use a function on the currently displayed number
  92. click select on the function name
  93.  
  94. ***  The inverse function of a key is available  ***
  95. ***  by clicking ADJUST rather than SELECT       ***
  96.  
  97.  (ie SELECT for sin, ADJUST for arcsin). 
  98.  
  99.  
  100.   Unobvious Adjust functions are:-
  101.  
  102. EXP  where SELECT sets the multiplying power of ten
  103.      and ADJUST gives PI (EXP also gives PI if you
  104.      have not entered any digits after a clear or
  105.      equals).
  106.  
  107. rnd  where SELECT fixes the display (see menu options
  108.      below) and ADJUST gives a random number.
  109.  
  110.  
  111.   If an algebraic operation (*/+-^) is clicked on twice
  112. then the calculator enters ‘constant’ mode, a ‘K’ lights up
  113. in the top left hand corner of the window to signify this.
  114. Once in constant mode the selected algebraic operation is
  115. repeated with the current register on any entered numbers
  116. each time = is clicked (try it and see!). Constant mode is
  117. cancelled by AC or entering any other algerbric operation.
  118.  
  119.  
  120.   Clicking on SciCalc’s iconbar sprite or on the
  121. calculator’s keys will cause the calculator to claim the
  122. caret and then numbers (including hex) can be entered via
  123. the keyboard or keypad. Note if numlock is off you will not
  124. be able to use the keypad(!).
  125.  
  126. <Escape> will return the caret to its original position.
  127.  
  128. NOTE # is AC, <delete> is C and <SH><del> is AC
  129.  
  130.  
  131. Memory
  132. ------
  133.  
  134.   Memory functions available are :- 
  135.  
  136. MR                 Memory recall
  137. Min                Memory set to display
  138.  
  139. To clear the memory SELECT clear and then SELECT Min
  140.  
  141. If a number is stored in the memory then the memory
  142. indicator (small M in the top left corner) is ‘lit
  143. up‘.
  144.  
  145.  
  146. Menu Options
  147. ------------
  148.  
  149. Option ‘Ascii’
  150.  
  151. This option has a submenu which displays all the ASCII
  152. characters in a window. To place an ascii value of a
  153. character in the display icon simply click on that
  154. character (clicking with select removes the window,
  155. clicking with adjust does not!). The ASCII value of the
  156. character will be displayed in the current base in the
  157. display icon. 
  158.  
  159.  
  160. Options ‘Deg’, ‘Hex’ and ‘Gra’
  161.  
  162.   To change the current angular measure choose the
  163. appropriate item. All angular functions will now operate in
  164. this measure and the correct angular measure indicator will
  165. ‘light up’.
  166.   The angular measure may also be set by clicking on the
  167. appropriate indicator.
  168.   Deg has 360 degrees in a circle
  169.   Rad has 2pi radians in a circle
  170.   Gra has 400 gradians in a circle
  171.  
  172. Options ‘Dec’, ‘Hex’ and ‘Bin’
  173.  
  174.   To change the current display base choose the appropriate
  175. item. ‘Dec’ represents base 10 (the usual one!), ‘Hex’ base
  176. 16 and ‘Bin’ base two. The display icon will change to the
  177. appropriate base and the correct base indicator will ‘light
  178. up‘.
  179.   The base may also be set by clicking on the appropriate
  180. indicator.
  181.  
  182. NOTE: Two new functions become available in Hex or Bin mode
  183.       <<  SELECT shifts the bits left, ADJUST right
  184.           (over/under flow ignored)
  185.       <O  SELECT rotates the bits left, ADJUST rights
  186.  
  187.       In base 16 sin, cos, tan, 1/x, log and ln become A,
  188.       B, C, D, E and F for hex entry. In bases 16 and 2 the
  189.       following functions cease to work (function!) sin,
  190.       cos, tan, hyp, root, 1/x, log, ln, rnd, rnd#, EXP.
  191.       Unavailable options are greyed out.
  192.  
  193.  
  194. Options ‘Norm’,‘Fix’ and ‘Sci’
  195.  
  196.   To change the method of displaying base ten numbers
  197. choose the appropriate item from the appropriate submenu
  198. (ie for fix 3 choose ‘3’ from the ‘Fix’ submenu). ‘Fix’
  199. specifies the number of decimal places to be displayed
  200. (rounding if necessary) the number if required, ‘Sci’
  201. specifies the number of significant digits past the decimal
  202. point under scientific notation (again rounding if
  203. necessary). ‘Norm’ unsets the ‘Fix’ and ‘Sci’ choice and
  204. returns the display mode to the one chosen by the
  205. application as appropriate
  206.  
  207. NOTE: The function ‘rnd’ will set the internal register to
  208.       the value of the displayed register (ie if you are
  209.       using Fix 3 to show 3.14159265 the the display is
  210.       3.142 and on clicking rnd the register storing
  211.       3.14159265 becomes 3.142 so if you choose ‘Norm’ the
  212.       display is still 3.142). Norm unsets Fix and Sci
  213.       settings.
  214.             
  215.  
  216. Result Dragging
  217. ---------------
  218.  
  219.   The value currently displayed (in the format displayed)
  220. can be transferred from !SciCalc to any other application
  221. (or the filer) as a textfile.
  222.  
  223.   To store the value simply drag the display icon onto the
  224. receiving application. The receiving application will treat
  225. this as it would when a textfile is dragged onto it. To
  226. facilitate this !SciCalc does not claim the caret when you
  227. click on the display icon (whereas it does if you click on
  228. any other).
  229.  
  230.   Sometimes it is either inconvenient or impossible to drag
  231. the display icon onto the receiving application (eg a
  232. writable icon). The result can be sent as if is was typed
  233. in by placing the pointer over the calculator and pressing
  234. <ALT>.
  235.  
  236.   The <SHIFT> facility is also particularly useful when using
  237. !Edit because !Edit does not move the caret to the end of a
  238. inserted file, the <SHIFT> facility does this by default.
  239. (Note Impression does not have this problem and drags can
  240. be done easily.)
  241.  
  242.  
  243. Appendix 1 - Functions
  244. ----------------------
  245.  
  246.   Key              Select                  Adjust
  247. -----------------------------------------------------------
  248. ! sin   ! Sine (x)                 ! Arcsine (x)          ! 
  249. ! cos   ! Cosine (x)               ! Arccosine (x)        !
  250. ! tan   ! Tangent (x)              ! Arctangent (x)       !
  251. ! hyp   ! Hyperbolic of trig fn ...! ArcHyperbolic trig fn!
  252. ! 1/x   ! The reciprocal of x      !                      !
  253. ! log   ! Log base 10 (x)          ! 10 to the power x    !    
  254. ! ln    ! Log base e (x)           ! e to the power x     !
  255. ! EXP   ! pi or  x*10^(entry)      ! pi                   !
  256. ! !     ! x factorial              !                      !
  257. ! Min   ! put x in the memory      !                      !
  258. ! MR _  ! display the memory       !                      !
  259. !   €   ! the square root of x     ! x²                   !
  260. ! x^y   ! x raised to power entry  ! x^(1/y)              !
  261. ! not   ! logical not x            !                      !
  262. ! and   ! logical and x with entry !                      !
  263. ! or    ! logical or x with entry  !                      !
  264. ! eor   ! logical eor x with entry !                      !
  265. ! rnd   ! Register set to display  ! Random # from 0 to 1 !
  266. ! AC    ! Clears all except memory !                      !
  267. ! C     ! Clears display only      !                      !
  268. ! +/-   ! swaps the sign of x      !                      !
  269. ! (     ! Open bracket,20 levels   !                      !
  270. ! )     ! Close bracket            !                      !
  271. ! <<    ! Shift bits left          ! Shift bits right     !
  272. ! <O    ! Rotate bits left         ! Rotate bits right    !
  273. -----------------------------------------------------------
  274.  
  275.  
  276. Appendix 2 - System Variable
  277. ----------------------------
  278.  
  279. The system variable <Emm’sSciCalc$Options> is read a run
  280. time (and saved with a desktop save). It can contains
  281. several modifiers :-
  282.  
  283. -base 10|16|2  (10 = dec, 16 = hex, 2 = bin)
  284. -mode 1|2|3    (1  = deg,  2 = rad, 3 = gra)
  285. -fix  n        (n = number of places       )
  286. -sci  n        (n = number of places       )
  287. -x    n        (n = bottom left x coord    )
  288. -y    n        (n = bottom left y coord    )
  289.  
  290. So Set Emm’sSciCalc$Dir -base 16 -mode 2 -sci 3
  291.  
  292. sets the base to hex, angular measure to radians and will
  293. uses scientific notation (3 places) when in decimal mode.
  294.  
  295.  
  296. Appendix 3 - Key short cuts
  297. ---------------------------
  298.  
  299. The following keys are short cuts to their 'iconsakes' :-
  300.  
  301. 0 1 2 3 4 5 6 7 8 9 - + / * = . ( )      (all with SELECT)
  302.  
  303. The following keys are mapped to their 'iconsakes' but
  304. WILL work when in base 10.
  305.  
  306. A B C D E F (all with SELECT)
  307.  
  308. The following keys are mapped as such :-
  309.  
  310.    Key                Icon
  311.  
  312.  <Delete>         C  (with SELECT)
  313.  <Shift><Delete>  AC (with SELECT)
  314.  #                C  (with SELECT)
  315.  <                << (with SELECT)
  316.  >                << (with ADJUST)
  317.  
  318. Appendix 4 - Versions
  319. ---------------------
  320.  
  321. v1.03  Due to popular appeal (well I did ask for comments!)
  322.        I have now made the mode buttons act to clicks (fix
  323.        and sci don't). The divide key has been ‘spriteized’
  324.        (cos someone who obviously doesn’t use Latin 1 asked
  325.        me to).
  326.  
  327. v1.04  Hex input can be in either case (thanks Damon)
  328.        Fixed the caret claiming bug (for good?)
  329.        Dragable results (idea from Keith Slone, thanks!)
  330.  
  331. v1.05  ASCII table added
  332.        When <SHIFT> is pressed the pointer need not be
  333.        on the display icon.
  334.        Calculator now starts at its template file position!
  335.  
  336. v1.05b Oh well - so there were a couple bugs that I didn’t
  337.        check in my hurry to release the 1.05 version (b for
  338.        bug fix!). Now the window for the ascii table is big
  339.        enough(!) and mode changes are handled properly (I
  340.        AM slacking a bit!)
  341.  
  342. v1.06  Well,well,well. I found a bug that has been resident
  343.        for yonks! (goes to show I actually use it!) - but
  344.        I fixed it. Now brackets ought to work perfectly.
  345.        FINALLY implemented constant operations (who noticed
  346.        it was in the template defn?) Ok, outside stats fns
  347.        I think I have done all I want to do on this app
  348.        now.
  349.  
  350. v1.06c Bug fixes again. The constant feature turned on
  351.        incorrectly (2*3*4 turned it on because there are
  352.        two *s !). Also clicking on the iconbar sprite
  353.        claims the caret. This must be it!
  354.  
  355. v1.06d Bug fixes again! Fix and Sci didn’t work properly
  356.        (ta Mike Smith) & fixed a few niggles I noticed when
  357.        playing. Changed my help system over to msgtrans
  358.        (hmm, my system was basically the same, just slower
  359.        cos in BASIC!).
  360.  
  361. v1.07  Having looked at a semi-working Acorn SciCalc (re
  362.        RISC OS 3!) made a fair few alterations to mine.
  363.        Hopefully this app will now be super-stable since
  364.        the process of compressing the code (much like
  365.        compilation) reveals any nasty bits!
  366.        • Gra (Gradians) with display switch (Ta Acorn!)
  367.        • Shift/Rotate bits in hex and bin modes
  368.          NOTE: mine work properly - Acorn’s are unintuitive
  369.        • Added Hyperbolic functions
  370.        • Added BASIC64 support, auto-detects BASIC VI
  371.        • Simple alteration when (if) extended precision
  372.          comes (add new case where exp_size%=4:sig_fig%=18)
  373.        • Changed system variable root to Emm’sSciCalc to
  374.          avoid clashes with the, now, more common Acorn one
  375.        • Added Desktop saving (from Acorn’s code!). I was
  376.          going to use system variables anyway but along
  377.          comes RISC OS 3
  378.        • Bug fixed Sci (again!)       
  379.        • Spotted (and fixed!) another caret claiming bug
  380.        • Fixed base changing bug so that the register is
  381.          not reset when a base change occurs (allows for 
  382.          easy inter-base calculations)
  383.        • Hex keys now change colour to that of the numbers‘
  384.        • Disabled & Greyed any unavailable keys
  385.        • Removed M+(M-), sacrificed for Hyp key
  386.        • Key input now not lost but still slow, but faster!
  387.          [can’t make it much faster, lose the icon flash]
  388.        • Simulated typing initiated by <ALT> now cos when
  389.          using <SHIFT> hassel since <SHIFT> is used in
  390.          day to dad life (this one by request!).
  391.        • Removed <SHIFT>=ADJUST in key input & replaced it
  392.          with add &80 onto icon number to click with ADJUST
  393.        • Tidied up code and compressed it so it still fits
  394.          into 48k!
  395.        • THIS MUST BE IT!
  396.  
  397.  
  398. Comments after 4 years!
  399. -----------------------
  400.  
  401. Yes indeed - this app is now over FOUR YEARS old making it
  402. one of the oldest multi-tasking PD RISC OS progs
  403.  
  404. Question - Who has been using it for more than two? 
  405.            (if you have - what are YOUR niggles with it?)
  406.  
  407. Question - Does it look nice?
  408.  
  409. Question - How do you people rate this app to the competition.
  410.            (Does it need a revamp?)
  411.  
  412. Question - Who uses the ASCII table?
  413.  
  414. No one has ever commented about the key short cuts.
  415.  
  416. Question - Does this mean everyone is happy with them as
  417.            they are or has someone found a more
  418.            comprehensive set?
  419.  
  420. Question - Do you really use result dragging - Can I improve
  421.            the output format? (user defined)
  422.  
  423. Question - More functions? (extra popup key window?) Which?
  424.  
  425. Answers on a postcard(!) or Arcade or maurp@csv.warwick.ac.uk
  426.  
  427.  
  428. Comments - For advanced users
  429. -----------------------------
  430.  
  431.   The file ‘KeyTable’ holds the key translation array, this
  432. has been created using the file ‘MakeTable’. This array
  433. maps ASCII values to icon numbers.
  434.  
  435.   Simply the file holds one byte for every ASCII character
  436. from 32 (space) to 94 (^). The byte stores the icon number
  437. to be ‘clicked’ if that particular key is pressed. The
  438. supplied translation table just translates the numbers and
  439. arithmetic operators, if you wish to translate other
  440. functions just call up the template in !FormEd, find the
  441. icon number for the function, assign the DATA statement on
  442. the appropriate line (representing the ASCII code) in
  443. ‘MakeTable’ to the icon number. Should you wish the icon to
  444. be clicked on by ADJUST rather than SELECT then add &80 to
  445. the icon number. Now run the program to create the new
  446. table (note ASCII 255 = no translation).
  447.  
  448.  
  449.   The ChkSpr Utility
  450.  
  451.   The chkspr utility will, when run, examine the ‘!Sprites’
  452. file and check if the first sprite is the application’s
  453. name. If not that sprite’s name will be changed to the
  454. application directory’s name. The !Boot file contains
  455. ‘Run ChkSpr’, this runs the util, the next line contains
  456. ‘IconSprites <Obey$Dir>.!Sprites’ this loads the new sprite
  457. in. The filer always calls any new (ie renamed) app’s !Boot
  458. file so the new sprite is automatically loaded for display.
  459.  
  460. Please feel free to use the utility separately from the
  461. rest of the package but please note that the conditions set
  462. out below apply to it.
  463.  
  464.  
  465. Conditions of Use
  466. -----------------
  467.  
  468.   This application is supplied free to everyone ‘as is’, I
  469. do not give any guarantee that it is free of bugs, or
  470. supply any warranty about its suitability for use. However
  471. if there are any problems with it and you notify me of them
  472. then I probably will do my best to rectify them.
  473.  
  474.   You may give this application to anyone, via any medium,
  475. so long as :- 
  476.  
  477.   1) It is delivered with ALL the supplied files and
  478.      unaltered (except !Run & !Boot files) .
  479.  
  480.   2) It is not supplied on a disc you are charging
  481.      for (except for media and postage costs).
  482.   
  483.   You have permission to use any part or the whole
  484. application in a project you intend to place in the public
  485. domain, as long as I am fully credited. If you wish to use
  486. these routines in a program that is for sale (for however
  487. much and for whatever reasons) or released as copyright
  488. material then my express permission in writing must be
  489. obtained. I maintain copyright on all the material
  490. supplied and reserve the right to amend these conditions in
  491. cases where I deem misuse.
  492.  
  493.    A large number of hours of work have gone into the
  494. production and maintenance of this application and although
  495. I have supplied the application free, donations will be
  496. gratefully received (and if over 10 pounds I will send you a
  497. disc with updates of this and all other pd stuff I have
  498. written. Please include a letter telling me which apps of
  499. mine you use and their version numbers).
  500.  
  501.  
  502. Contacts
  503. --------
  504.  
  505. My address:
  506.  
  507.   c/o 6 Parklands Place,
  508.       Guildford,
  509.       Surrey GU1 2PS.
  510.  
  511.  
  512. BBS I call frequently:
  513.  
  514.   Arcade  BBS          [081 654 2212]   mbx 23
  515.  
  516. Email address (the best way to contact me)
  517.  
  518. maurp@csv.warwick.ac.uk
  519.  
  520. © Emmet Spier 1993 - USE and Enjoy!
  521.